﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DiveManager
{
    public partial class Storage_Location_New : Form
    {

        public int bereich;
        public int reihe;
        public int fach;
        public int fachnummer;
        public int freigabe;
        
        public Storage_Location_New()
        {
            InitializeComponent();
        }

        private void btOpen_Click(object sender, EventArgs e)
        {
            //Lagerfach für die Benutzung freigeben
            freigabe = 1;
            btClose.Visible = true;
            btOpen.Visible = false;
        }

        private void btClose_Click(object sender, EventArgs e)
        {
            //Lagerfach für die Benutzung sperren
            freigabe = 0;
            btClose.Visible = false;
            btOpen.Visible = true;
        }

        private void btAdd_Click(object sender, EventArgs e)
        {
            //Auslesen der Daten
            bereich = Convert.ToInt32(txArea.Text);
            reihe = Convert.ToInt32(txWide.Text);
            fach = Convert.ToInt32(txHigh.Text);

            txFachnummer.Text = bereich.ToString() + reihe.ToString() + fach.ToString();
            txFach.Text = bereich.ToString() +"-"+ reihe.ToString() +"-"+ fach.ToString();

            fachnummer = Convert.ToInt32(txFachnummer.Text);
            //Lagerplatz anlegen

           
        }

        private void btCancel_Click(object sender, EventArgs e)
        {
            //Abbrechen
            this.Close();
        }

        private void txArea_TextChanged(object sender, EventArgs e)
        {
           
            
        }

        private void txWide_TextChanged(object sender, EventArgs e)
        {
           }

        private void txHigh_TextChanged(object sender, EventArgs e)
        {
             }

        private void Storage_Location_New_Load(object sender, EventArgs e)
        {
            txArea.Text = "0";
            txWide.Text = "0";
            txHigh.Text = "0";
        }
    }
}
